<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>配件管理</title>
    <link href="{:C('WEB_URL')}Public/admin/style/base.css" rel="stylesheet" type="text/css" />
    <link href="{:C('WEB_URL')}Public/admin/style/master.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="{:C('WEB_URL')}Public/admin/js/jquery1.9.1.js"></script>
    <script type="text/javascript" src="{:C('WEB_URL')}Public/admin/js/base.js"></script>
    <script>
        function del(id){
            if(confirm('确定要删除记录吗?')){
                var url="__URL__/delType/pt_id/"+id;
               // alert(url);
				$.getJSON(url,function(data){
                    if(data['status']==1){
                        $(".list > tbody").children("#J_list"+data['data']).remove();
                    }else{
                        alert(data['info']);
                    }
                })
            }
        }
    </script>

</head>
<body>
<body>
    <div id="wrapper">
        <h2>配件分类<a href="{:U('pjTypeEdit')}" class="but_add">添加</a></h2>
        <table class="list">
            <thead>
                <tr>
					<th>id</th><th>分类名称</th><th>添加时间</th><th>操作</th>
                </tr>
            </thead>
            <tbody>
            <volist name='list' id='vo'>
                <tr align="center" id="J_list{$vo['pj_id']}">
                    <td>{$vo['pt_id']}</td>
                    <td>{$vo['name']}</td>
                    <td><?php echo date('Y-m-d H:i:s',$vo['create_time']); ?></td>
                    <td>
                        <a href="{:U('pjTypeEdit',array('pt_id'=>$vo['pt_id']))}" class="edit" >编辑</a>
                        <span class="del hide" onClick="del({$vo['pt_id']})">删除</span>
                    </td>
                </tr>
            </volist>
            </tbody>
        </table>
        <p class="hr_10"></p>
        <div class="pages">{$page} </div>
    </div>
	
</body>
</html>